package com.hzdl.goods;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@SpringBootApplication
// 开启EurekaClient
@EnableEurekaClient
// 可以指定其他的注册中心
//@EnableDiscoveryClient
public class GoodsApplication implements WebMvcConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(GoodsApplication.class, args);
    }

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addRedirectViewController("/", "/h2-console");
    }

}
